package com.zhledu.datastructure.tree;

public class TreeNode<T> {
    T value;
    TreeNode<T> leftChild;
    TreeNode<T> rightChild;
    TreeNode(T value) {
        this.value = value;
    }
    TreeNode() {
    }
    public void addLeft(T value) {
        TreeNode<T> leftChild = new TreeNode<T>(value);
        this.leftChild = leftChild;
    }
    public void addRight(T value) {
        TreeNode<T> rightChild = new TreeNode<T>(value);
        this.rightChild = rightChild;
    }
}
